local sk__zhuzai = fk.CreateSkill {

  name = "sk__zhuzai",

  tags = { Skill.Compulsory, },

}



sk__zhuzai:addEffect(fk.DamageInflicted, {
  name = "sk__zhuzai",
  mute = true,
  can_trigger = function(self, event, target, player, data)
    return target and target == player and player:hasSkill(sk__zhuzai.name) and data.card and
        data.card.type == Card.TypeTrick
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    player:broadcastSkillInvoke(sk__zhuzai.name)
    room:notifySkillInvoked(player, sk__zhuzai.name, "defensive")
    data.damage = data.damage - 1
  end,
})
sk__zhuzai:addEffect(fk.DamageCaused, {
  name = "sk__zhuzai",
  mute = true,
  can_trigger = function(self, event, target, player, data)
    return target and target == player and player:hasSkill(sk__zhuzai.name) and data.card and
        data.card.type == Card.TypeTrick
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    player:broadcastSkillInvoke(sk__zhuzai.name)
    room:notifySkillInvoked(player, sk__zhuzai.name, "offensive")
    data.damage = data.damage + 1
  end,
})

return sk__zhuzai
